Skip to content

chore: update dependency versions for swc plugin and rspack core#50

Merged
xierenyuan merged 1 commit intomainfrom
chore/update-dependency-versions
Dec 23, 2025
Merged

chore: update dependency versions for swc plugin and rspack core#50
xierenyuan merged 1 commit intomainfrom
chore/update-dependency-versions

Conversation

@xierenyuan
Copy link
Contributor

@xierenyuan xierenyuan commented Dec 23, 2025

升级 rspack 版本


Note

Dependency upgrades

  • Bump @kmijs/swc-plugin-auto-css-modules to 0.1.0 in bundler-rspack
  • Bump @rspack/core to 1.6.8 in bundler-shared

Lockfile/tooling refresh

  • Update @rspack/* platform bindings and @module-federation/* to newer versions
  • Upgrade rolldown-vite to 7.3.0 and rolldown to 1.0.0-beta.53 (with new platform bindings)
  • Align CSS pipeline: postcss 8.5.6, cssnano preset deps, and lightningcss 1.30.2
  • Misc version bumps: picomatch, fdir, @oxc-project/*, @napi-rs/wasm-runtime

Written by Cursor Bugbot for commit d6d1b54. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Updated bundler dependencies to latest compatible versions for improved stability and performance

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

Dependency version updates across bundler packages: "@kmijs/swc-plugin-auto-css-modules" bumped from 0.0.1 to 0.1.0 in bundler-rspack, and "@rspack/core" upgraded from 1.4.8 to 1.6.8 in bundler-shared.

Changes

Cohort / File(s) Summary
Package dependency version updates
packages/bundler-rspack/package.json, packages/bundler-shared/package.json
Version bump for "@kmijs/swc-plugin-auto-css-modules" (0.0.1 → 0.1.0) and "@rspack/core" (1.4.8 → 1.6.8)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: updating dependency versions for two packages (@kmijs/swc-plugin-auto-css-modules and @rspack/core).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/update-dependency-versions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

"@kmijs/bundler-shared-config": "workspace:*",
"@kmijs/shared": "workspace:*",
"@kmijs/swc-plugin-auto-css-modules": "0.0.1",
"@kmijs/swc-plugin-auto-css-modules": "0.1.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js engine constraint inconsistent with dependency requirements

The bundler-rspack package declares engine support for Node.js ^14.18.0 || >=16.10.0, but the upgraded @rspack/core@1.6.8 dependency now requires node: '>=18.12.0'. Users running on Node.js 14.x or 16.x may encounter runtime failures since the actual minimum Node.js version is now 18.12.0. The engines field in bundler-rspack and potentially bundler-shared needs updating to reflect the new requirement.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a98cb51 and d6d1b54.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/bundler-rspack/package.json
  • packages/bundler-shared/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: lint
  • GitHub Check: build-and-test (22.x, ubuntu-latest)
  • GitHub Check: build-and-test (22.x, windows-latest)
🔇 Additional comments (1)
packages/bundler-rspack/package.json (1)

34-34: Check if v0.1.0 is publicly available and review its changelog for breaking changes.

The @kmijs/swc-plugin-auto-css-modules v0.1.0 cannot be found on the public npm registry. This appears to be a private or internal package. While the pnpm-lock.yaml confirms resolution to v0.1.0, you'll need to access your organization's package registry or repository to review the changelog and verify whether this minor version bump introduces breaking changes. The plugin is currently configured with an empty object ({}), so any API or behavior changes would be breaking.

Additionally, there's a typo in the documentation at docs/docs/config/config.md line 1382—it references @ksuni/swc-plugin-auto-css-modules instead of @kmijs/swc-plugin-auto-css-modules. This should be corrected.

"dependencies": {
"@kmijs/shared": "workspace:*",
"@rspack/core": "1.4.8",
"@rspack/core": "1.6.8",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify @rspack/core version 1.6.8 existence

# Check if version 1.6.8 exists
echo "=== Checking if @rspack/core@1.6.8 exists ==="
npm view @rspack/core@1.6.8 version 2>&1

# Get available versions between 1.4.8 and 1.6.8
echo -e "\n=== Available versions between 1.4.8 and 1.6.8 ==="
npm view @rspack/core versions --json 2>&1 | jq -r '.[]' | grep -E '^1\.(4|5|6)' | sort -V

Repository: kmijs/kmi

Length of output: 553


🌐 Web query:

@rspack/core 1.6.8 changelog release notes

💡 Result:

@rspack/core v1.6.8 — published Dec 17, 2025. See the release listing and Rspack release activity for details. (releasealert.dev)

Citations:


🌐 Web query:

@rspack/core breaking changes migration 1.4 to 1.6

💡 Result:

Here are the main breaking changes and migration actions when moving @rspack/core from 1.4 → 1.6 (concise checklist):

  • CSS builtins removed — replace builtins.css with the new CSS options (module.parser / module.generator) and switch any usages of builtins CSS plugins to the new plugins (e.g., use rspack.LightningCssMinimizerRspackPlugin). Update CSS-related config accordingly. (rspack.rs)

  • New tree-shaking algorithm / ESM output changes — 1.6 improves/enables a new tree-shaking behavior and ESM output handling; verify dynamic-import patterns and expect different tree-shake results (may need to adjust imports or sideEffects). Test bundles and adjust code that relied on prior dead-code retention. (rspack.rs)

  • Remove compiler.build and compiler.rebuild — code calling these internal APIs must be updated (use the supported public APIs / runner patterns instead). (rspack.rs)

  • experiments.* option removals / defaults changed — some experiments flags were removed or defaulted (e.g., disableApplyEntryLazily removed; new resolver enabled by default earlier). Audit your experiments.* usage and remove or adapt configs that targeted removed flags. (rspack.rs)

  • SWC plugin / SWC core version bumps — if you use SWC Wasm plugins (e.g., @swc/plugin-emotion), upgrade them to versions compatible with the newer swc_core used by Rspack 1.4→1.6 to avoid build errors. Also check minimizer option shape changes (e.g., passes → compress.passes). (rspack.rs)

  • Lazy compilation middleware change (from 1.4) — middleware now reads lazyCompilation from the compiler; remove manual passing of that option if you followed earlier examples. Confirm any custom dev-server middleware is updated. (rspack.rs)

  • General plugin API / builtin adjustments — some builtins were removed or renamed; search your config for usages of removed builtins (SwcCssMinimizerRspackPlugin → LightningCssMinimizerRspackPlugin, builtins.* options) and replace accordingly. (rspack.rs)

Quick migration steps

  1. Run tests and a full build locally and in CI; capture failures.
  2. Search your config for: builtins., experiments., compiler.build/rebuild, old minimizer/plugin names, SWC plugin imports, and resolve.extensions; update per notes above. (rspack.rs)
  3. Upgrade SWC-related plugins to versions compatible with swc_core used by 1.6. (rspack.rs)
  4. Inspect bundle output (tree-shaken modules, ESM artifacts) and adjust code that relied on previous bundling behaviors. (rspack.rs)

If you want, tell me where your current config or code calls the removed APIs (paste snippets) and I’ll provide exact replacements.

Citations:


🏁 Script executed:

#!/bin/bash
# Search for breaking change patterns in the codebase

# Search for CSS builtins usage
echo "=== Searching for CSS builtins usage ==="
rg "builtins\.css|builtins\." --type js --type json --type ts 2>/dev/null | head -20

# Search for compiler.build/rebuild usage
echo -e "\n=== Searching for compiler.build/rebuild usage ==="
rg "compiler\.(build|rebuild)" --type js --type ts 2>/dev/null | head -20

# Search for experiments config
echo -e "\n=== Searching for experiments config ==="
rg "experiments\s*:" --type json --type js 2>/dev/null | head -20

# Search for rspack config files
echo -e "\n=== Searching for rspack config files ==="
find . -name "rspack*.config.*" -o -name "webpack.config.*" 2>/dev/null | grep -v node_modules | head -20

# Check the actual bundler-shared package.json content
echo -e "\n=== Current @rspack/core dependency in bundler-shared ==="
cat packages/bundler-shared/package.json | grep -A 2 -B 2 "@rspack/core"

Repository: kmijs/kmi

Length of output: 50367


🏁 Script executed:

#!/bin/bash
# More targeted search for rspack config and breaking change patterns

# Find rspack config files
echo "=== Finding rspack config files ==="
find . -type f -name "*rspack*.config.*" 2>/dev/null | head -20

# Check bundler-shared package.json dependencies
echo -e "\n=== Dependencies in bundler-shared/package.json (lines 130-140) ==="
sed -n '130,140p' packages/bundler-shared/package.json

# Search for any SWC minimizer configuration patterns
echo -e "\n=== Searching for minimizer/SWC config ==="
rg "SwcCssMinimizerRspackPlugin|LightningCssMinimizerRspackPlugin|minimizer" --type json --type js 2>/dev/null | grep -v node_modules | head -20

# Search for any experiments config in source files
echo -e "\n=== Checking for experiments config in bundler files ==="
find packages/bundler-shared -type f \( -name "*.js" -o -name "*.ts" -o -name "*.json" \) -exec grep -l "experiments" {} \; 2>/dev/null

Repository: kmijs/kmi

Length of output: 50365


Verify the @rspack/core version upgrade and check for breaking changes.

The version upgrade from 1.4.8 to 1.6.8 (skipping 1.5.x) has been confirmed—1.6.8 was published on Dec 17, 2025. However, significant breaking changes exist between these versions:

  • CSS builtins removed: Replace builtins.css with new CSS options (module.parser / module.generator). Update any SWC CSS minimizer plugin references (e.g., SwcCssMinimizerRspackPluginLightningCssMinimizerRspackPlugin).
  • Tree-shaking and ESM output changes: 1.6 introduces improved tree-shaking behavior; verify dynamic-import patterns and test bundle output.
  • Removed APIs: compiler.build and compiler.rebuild internal APIs were removed; switch to supported public APIs if used.
  • experiments. options*: Some experiment flags were removed or defaulted; audit config for removed flags.
  • SWC plugin compatibility: If using SWC Wasm plugins, upgrade them to versions compatible with the newer swc_core used by Rspack 1.6.

Run a full build locally and in CI, inspect bundle output for tree-shaken modules and ESM artifacts, and test that no config references removed builtins or internal APIs.

🤖 Prompt for AI Agents
In packages/bundler-shared/package.json around line 133, the dependency bump of
@rspack/core from 1.4.8→1.6.8 introduces breaking changes; audit and update
configs and code: search and replace any use of builtins.css with the new CSS
config (module.parser/module.generator), replace SWC CSS minimizer plugin
references (e.g., SwcCssMinimizerRspackPlugin →
LightningCssMinimizerRspackPlugin) and upgrade any SWC wasm plugins to versions
compatible with the swc_core used by Rspack 1.6; search for removed internal
APIs (compiler.build / compiler.rebuild) and migrate to supported public APIs;
review experiments.* flags for removed/defaulted options and remove or adjust
them; then run a full local and CI build, inspect bundle outputs for changed
tree-shaking/ESM behavior (verify dynamic-imports and removed modules), run
tests, and fix any regressions discovered.

@xierenyuan xierenyuan merged commit 51c2966 into main Dec 23, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant